<template>
  <view class="page">
    <fu-custom :isBack="true" :isBottom="true" bgColor="bg-white">
			<view slot="content">{{i18n["修改支付密码"]}}</view>
		</fu-custom>
    <view class="padding-bottom-160 text-df ">
      <!-- 旧密码验证修改 start -->
      <view  v-if="isHavePassword"  @tap="handleJump"  data-url="/pages/index/setting/change-pay-password/index">
        <view class=" padding flex align-center justify-between solid-bottom bg-white">
          <text class="text-lg text-black ">{{i18n['旧支付密码验证修改']}}</text>
          <text class="fu-iconfont text-bf">&#xe839;</text>
        </view>
      </view>
      <!-- 旧密码验证修改 end -->
      <!-- 手机号码验证修改 start -->
      <view @click="handleRoute">
        <view class="padding flex align-center justify-between solid-bottom bg-white">
          <text class="text-lg text-black">{{i18n['手机号验证修改']}}</text>
          <text class="fu-iconfont text-bf">&#xe839;</text>
        </view>
      </view>
      <!-- 手机号码验证修改 end -->
    </view>

    <!-- 断网监测 start -->
    <fu-notwork></fu-notwork>
    <!-- 断网监测 end -->
  </view>
</template>

<script>
  export default {
    data() {
      return {
        isHavePassword:true,

      };
    },
    computed: {

    },
    onShow() {
     this.is_have_password()
    },
    onLoad() {
    },
    methods: {
      // 0 没有设置过密码 1 有设置密码
      is_have_password() {
        let that = this;
        this.$api
          .post(global.apiUrls.postloginIsHavePassword)
          .then(res => {
            if(res.data.code == 1){
              that.isHavePassword =  res.data.data.is_pay_password
            }
          })
          .catch(err => {
            console.log(err);
          });
      },
      handleRoute(){
        this.$urouter.navigateTo({
          url: '/pages/index/setting/modify-password-verify-phone/index',
          params: {
            type: 1,
          }
        });
      },

    }
  };
</script>

<style lang="scss" scoped>
 

</style>
